import { http } from '@/utils'

export interface Response {
    code: number;
    data: Datum[];
    [property: string]: any;
}

export interface Datum {
    alt: string;
    banner: null | string;
    caption: null | string;
    category: Category[];
    content: null | string;
    default_image: null | string;
    description: null | string;
    display: number;
    icon: null;
    id: number;
    is_deleted: boolean;
    keywords: null | string;
    level: number;
    line_image: null;
    recommended: number;
    release_time: string;
    router: string;
    sequence: number;
    title: string;
    update_time: string;
    views: null;
    [property: string]: any;
}

export interface Category {
    content: null | string;
    id: number;
    image: null | string;
    router: string;
    title: string;
    [property: string]: any;
}

export function fetchNavListAPI() {
    return http.request<Response>({
        url: '/category/nav/',
    })
}